﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using BrushVisualizer;
using BrushVisualizer.Visualizer;

namespace ConsoleApplication1
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            var b = GetDrawingBrush();
            BrushDebuggerVisualizer.TestShowVisualizer(b);
        }

        private static Brush GetRadialGradientBrush()
        {
            return new RadialGradientBrush(GetGradientStops());
        }

        private static Brush GetLinearGradientBrush()
        {
            return new LinearGradientBrush(GetGradientStops());
        }
        private static Brush GetSolidColorBrush()
        {
            return new SolidColorBrush(Colors.DeepSkyBlue);
        }
        private static Brush GetDrawingBrush()
        {
            return new DrawingBrush(new GeometryDrawing(Brushes.BlanchedAlmond, new Pen(Brushes.Indigo, 4), new EllipseGeometry(new Rect(0, 0, 200, 40))));
        }

        private static Brush GetVisualBrush()
        {
            Size s = new Size(100, 50);
            Button btn = new Button { Content = "Click Me", Padding = new Thickness(5) };
            btn.Measure(s);
            btn.Arrange(new Rect(s));
            return new VisualBrush(btn);
        }

        private static Brush GetImageBrush()
        {
            return new ImageBrush(new BitmapImage(new Uri(@"C:\Users\Public\Pictures\Sample Pictures\Koala.jpg")));
        }

        private static GradientStopCollection GetGradientStops()
        {
            return new GradientStopCollection
                {
                    new GradientStop(Colors.DeepSkyBlue, 0),
                    new GradientStop(Colors.DarkBlue, 0.3),
                    new GradientStop(Colors.DodgerBlue, 0.6),
                    new GradientStop(Colors.SlateBlue, 1.0)
                };
        }
    }
}
